Optimal. Leaf size=58 \[ \frac {(b \cos (c+d x)-a \sin (c+d x))^3}{3 d}-\frac {\left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {3072} \[ \frac {(b \cos (c+d x)-a \sin (c+d x))^3}{3 d}-\frac {\left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3072
Rubi steps
\begin {align*} \int (a \cos (c+d x)+b \sin (c+d x))^3 \, dx &=-\frac {\operatorname {Subst}\left (\int \left (a^2+b^2-x^2\right ) \, dx,x,b \cos (c+d x)-a \sin (c+d x)\right )}{d}\\ &=-\frac {\left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))}{d}+\frac {(b \cos (c+d x)-a \sin (c+d x))^3}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.34, size = 81, normalized size = 1.40 \[ \frac {\left (b^3-3 a^2 b\right ) \cos (3 (c+d x))-9 b \left (a^2+b^2\right ) \cos (c+d x)+2 a \sin (c+d x) \left (\left (a^2-3 b^2\right ) \cos (2 (c+d x))+5 a^2+3 b^2\right )}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 77, normalized size = 1.33 \[ -\frac {3 \, b^{3} \cos \left (d x + c\right ) + {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{3} - {\left (2 \, a^{3} + 3 \, a b^{2} + {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 91, normalized size = 1.57 \[ -\frac {{\left (3 \, a^{2} b - b^{3}\right )} \cos \left (3 \, d x + 3 \, c\right )}{12 \, d} - \frac {3 \, {\left (a^{2} b + b^{3}\right )} \cos \left (d x + c\right )}{4 \, d} + \frac {{\left (a^{3} - 3 \, a b^{2}\right )} \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {3 \, {\left (a^{3} + a b^{2}\right )} \sin \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 9.74, size = 75, normalized size = 1.29 \[ \frac {-\frac {b^{3} \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}+b^{2} a \left (\sin ^{3}\left (d x +c \right )\right )-\left (\cos ^{3}\left (d x +c \right )\right ) a^{2} b +\frac {a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 84, normalized size = 1.45 \[ -\frac {a^{2} b \cos \left (d x + c\right )^{3}}{d} + \frac {a b^{2} \sin \left (d x + c\right )^{3}}{d} - \frac {{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3}}{3 \, d} + \frac {{\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} b^{3}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.57, size = 104, normalized size = 1.79 \[ \frac {\frac {\sin \left (c+d\,x\right )\,a^3\,{\cos \left (c+d\,x\right )}^2}{3}+\frac {2\,\sin \left (c+d\,x\right )\,a^3}{3}-a^2\,b\,{\cos \left (c+d\,x\right )}^3-\sin \left (c+d\,x\right )\,a\,b^2\,{\cos \left (c+d\,x\right )}^2+\sin \left (c+d\,x\right )\,a\,b^2+\frac {b^3\,{\cos \left (c+d\,x\right )}^3}{3}-b^3\,\cos \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.52, size = 117, normalized size = 2.02 \[ \begin {cases} \frac {2 a^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {a^{2} b \cos ^{3}{\left (c + d x \right )}}{d} + \frac {a b^{2} \sin ^{3}{\left (c + d x \right )}}{d} - \frac {b^{3} \sin ^{2}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {2 b^{3} \cos ^{3}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\relax (c )} + b \sin {\relax (c )}\right )^{3} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________